package com.spark.util;

import java.util.UUID;

import org.apache.commons.codec.digest.DigestUtils;

/**
 * ID生成器
 * 
 * @version $Id$
 * @author <a href="mailto:njq.niu@hand-china.com">znjq</a>
 */
public class IDGenerator {

	// Singleton
	private static final IDGenerator instance = new IDGenerator();

	public static IDGenerator getInstance() {
		return instance;
	}

	public String generate() {
		String uuid = UUID.randomUUID().toString().replace("-", "").toUpperCase();
//		String id = DigestUtils.md5Hex(uuid);
		return uuid;
	}

}
